# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=py3-django-rest-framework
_pkgname=django-rest-framework
pkgver=3.11.0
pkgrel=0
pkgdesc="Web APIs for Django"
options="!check" # fails with "OperationalError: no such table: auth_user"
url="https://github.com/encode/django-rest-framework"
arch="noarch"
license="Custom"
depends="py3-django"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-tz py3-core-api py3-jinja2 py3-uritemplate"
source="$pkgname-$pkgver.tar.gz::https://github.com/encode/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	python3 setup.py --quiet build
}

check() {
	python3 runtests.py
}

package() {
	python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
}

sha512sums="7f49e02fa8d4d91a7aeb832814d6c53f3367fef8048bf6a1ad1f53a9f0b4c19e06cf76884a540144961ebe6a3f296afa9a427e4eea9e08578052dccb46da9c52  py3-django-rest-framework-3.11.0.tar.gz"
